package com.esyoga.yoyoga.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateFormatUtil {
    private DateFormatUtil(){}
    private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    public static String getCurrentDateString(){
        Date date = new Date();
        String dateString = simpleDateFormat.format(date);
        return dateString;
    }

    public static Date getCurrentDate(String DateString) throws ParseException {
        Date parse = simpleDateFormat.parse(DateString);
        return parse;
    }
}
